---
import BaseLayout from "@layouts/Layout.astro";
import { getone } from "@libs/config/dbconfig";

const { id } = Astro.params;

// const entry = await getEntryBySlug('blog', slug);
const data = await await getone(id);
console.log(data);

// const { api } = Astro.params;
// const { data } = Astro.props;

const title = data.title;
const description = data.description;
---

<!-- {api} -->
<BaseLayout content={{ title, description }}>
  <h1>{data.title}</h1>
  <p>{data.description}</p>
  <img src={data.thumbnail} />
</BaseLayout>

<style>
  h1 {
    @apply font-extrabold  font-extrabold text-4xl colors-primary flex font-sans;
  }
  p {
    @apply colors-secondary  text-xl flex font-sans flex;
  }
</style>
